﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using KPIS.GERP.GBMS.BLL;
using KPIS.GERP.GBMS.MODEL;
using KPIS.GERP.GBMS.IBLL;
using Telerik.Web.UI;

namespace KPIS.GERP.GBMS.APP_UI.Controls
{
    public partial class ProjectDataGrid : System.Web.UI.UserControl
    {
        private IProjectBLL pj;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

            }
        }

        public void LoadProjectDataGrid(ProjectProvider pjType, ProjectInfo pjCritiria)
        {
            pj = ProjectFactory.GetProjectFactory(pjType);

            Grid.DataSource = pj.Search(pjCritiria);

            GridGroupByExpression g4 = new GridGroupByExpression(Grid.Columns[4]);
            Grid.MasterTableView.GroupByExpressions.Add(g4);

            Grid.DataBind();
        }
    }
}